<?php
/**
 * Created by PhpStorm.
 * User: jucai002
 * Date: 2019/2/11
 * Time: 11:56
 */

namespace app\modules\admin\controllers;

/**
 * Class ParameterController
 * @package app\modules\admin\controllers
 * 参数设置
 */
class ParameterController extends DefaultController
{
    /*
     * 基础设置
     */
    public function actionIndex()
    {
        return $this->render('index', [
            'head' => $this->Index(),
            'end' => $this->End(),
            'b_head' => $this->b_head('index')
        ]);
    }

    /*
     * 试玩配置
     */
    public function actionDemo_tyt()
    {
        return $this->render('demo_tyt', [
            'head' => $this->Index(),
            'end' => $this->End(),
            'b_head' => $this->b_head('demo_tyt')
        ]);
    }

    /*
     * 正式配置
     */
    public function actionGame_tyt()
    {
        return $this->render('game_tyt', [
            'head' => $this->Index(),
            'end' => $this->End(),
            'b_head' => $this->b_head('game_tyt')
        ]);
    }

    /*
     * 储值设置
     */
    public function actionStored_value()
    {
        return $this->render('stored_value', [
            'head' => $this->Index(),
            'end' => $this->End(),
            'b_head' => $this->b_head('stored_value')
        ]);
    }

    /*
     * 规则说明
     */
    public function actionExplain()
    {
        return $this->render('explain', [
            'head' => $this->Index(),
            'end' => $this->End(),
            'b_head' => $this->b_head('explain')
        ]);
    }

    /*
     * 公告设置
     */
    public function actionNotice()
    {
        return $this->render('notice', [
            'head' => $this->Index(),
            'end' => $this->End(),
            'b_head' => $this->b_head('notice')
        ]);
    }

    /*
     * 高级设置
     */
    public function actionAdvanced_setting()
    {
        return $this->render('advanced_setting', [
            'head' => $this->Index(),
            'end' => $this->End(),
            'b_head' => $this->b_head('advanced_setting')
        ]);
    }


    /*
     * 头部
     */
    public function b_head($key)
    {
        $tmp = [
            "index" => "<a href='index'>基础设置-0-1</a></li>",
            "demo_tyt" => "<a href='demo_tyt'>试玩游戏设置-0-1</a></li>",
            "game_tyt" => "<a href='game_tyt'>正式游戏设置-0-1</a></li>",
            "stored_value" => "<a href='stored_value'>储值设置-0-1</a></li>",
            "explain" => "<a href='explain'>规则说明-0-1</a></li>",
//            "zf" => "<a>支付参数</a></li>",
            "notice" => "<a href='notice'>公告设置-0-1</a></li>",
            "advanced_setting" => "<a href='advanced_setting'>高级设置-0-1</a></li>",
        ];
        $html = '<div class="right-content">
    <style>
        .settings {
            display: none;
        }

        .help-block {
            color: red !important;
        }

        .item {
            padding: 10px;
            border: 1px solid gainsboro;
            margin: 5px;
            width: 330px;
            display: inline-block;
            position: relative;
            text-align: center;
        }

        .item img {
            width: 100%;
        }

        .item input {
            margin-top: 10px;
            display: inline;
        }

        .item input[type=text] {
            width: 65%;
        }

        .item input[type=number] {
            width: 30%;
            margin-right: 2%;
        }

        .item span {
            position: absolute;
            right: 0;
            font-size: 25px;
            color: red;
        }

        .item span:hover {
            font-size: 30px;
            border: 1px solid gainsboro;
            border-radius: 5px;
            background: black;
            cursor: pointer;
        }

        .img_group p {
            text-align: center;
        }
    </style>';
        $html .= "<ul class='nav nav-tabs' id='snav'>";
        foreach ($tmp as $k => $v) {
            if ($k == $key) {
                $html .= "<li class='active'>" . $v;
            } else {
                $html .= "<li class=''>" . $v;
            }
        }
        $html .= "</ul>";
        return $html;
    }

}